/**
 *
 * 表单字段定义
 *
 */

/**
 * 生成表单基本字段
 *
 * @returns {{clearable : boolean, controlType : string}}
 */
const baseField = () => Object.create({
  clearable: true,
  controlType: 'input'
})

/**
 * 表单方法
 */
export const formFuncs = {
  /**
   * 处理详情页面字段
   * @param items
   * @param label
   */
  handleDetailItem: (items, label) => {
    if (items.length <= 0) {
      return
    }
    const origin = items
    items = []
    for (const item of origin) {
      const temp = formFuncs.withProperty(item, formItems.DISABLE)
      items.push(temp)
    }

    if (label) {
      items = [formFuncs.createLabel(label), ...items]
    }
    return items
  },
  /**
   * 新增属性，统一深克隆版本
   * @param object
   * @param params
   * @returns {*}
   */
  addProperty: (object, params) => Object.assign(Object.create(object), params),
  /**
   * 创建标签
   * @returns {any}
   * @param label
   */
  createLabel: (label) => createField({
    label: label, controlType: 'title'
  }),
  /**
   * 多选框生成
   * @param label
   * @param parmsName
   * @param checkboxItems
   * @returns {any}
   */
  createCheckBox: (label, parmsName, checkboxItems = []) => createField({
    label: label, parmsName: parmsName, controlType: 'checkbox', checkboxItems: checkboxItems
  }),
  /**
   * 新增属性-便携版
   * @param object
   * @param properties
   * @returns {*}
   */
  withProperty: (object, ...properties) => {
    const temp = Object.create(object)
    properties.forEach(property => {
      switch (property) {
        case formItems.DISABLE:
          Object.assign(temp, { disabled: true })
          break
        case formItems.REQUIRE:
          if (temp.hasOwnProperty('rules')) {
            temp.rules.push({ required: true, message: temp.placeholder, trigger: 'blur' })
          } else {
            Object.assign(temp, { rules: { required: true, message: temp.placeholder, trigger: 'blur' }})
          }
          break
        default:
      }
    })
    return temp
  },
  /**
   * 统一禁用
   * @param objects
   * @returns {[]}
   */
  disableAllProperty: (objects = []) => {
    const result = []
    objects.forEach(each => {
      result.push(Object.assign(Object.create(each), { disabled: true }))
    })
    return result
  }
}

/**
 * 生成表单字段
 *
 * @param params
 * @returns {any}
 */
const createField = (params) => {
  const temp = Object.assign(baseField(), params)
  switch (temp.controlType) {
    case 'select':
    case 'datePicker':
    case 'checkbox':
      temp.placeholder = '请选择'
      break
    case 'input':
    default:
      temp.placeholder = '请输入'
      temp.maxlength = 50
  }
  temp.prop = temp.parmsName
  temp.placeholder += temp.label
  temp.sortable = true
  if (params.placeholder) {
    temp.placeholder = params.placeholder
  }
  if (params.maxlength) {
    temp.maxlength = params.maxlength
  }
  if (!params.size) {
    temp.size = 'small'
  }
  return temp
}

/**
 * 基本输入框生成
 *
 * @param label
 * @param parmsName
 * @param maxlength
 * @returns {any}
 */
const createInput = (label, parmsName, maxlength = 50, placeholder) => createField({
  label: label, parmsName: parmsName, maxlength: maxlength, placeholder: placeholder
})
/**
 * 金额输入框
 *
 * @param label
 * @param parmsName
 * @returns {any}
 */
const createMoney = (label, parmsName) => createField({
  label: label, parmsName: parmsName, controlType: 'money'
})
/**
 * 身份证号输入框
 *
 * @param label
 * @param parmsName
 * @returns {any}
 */
const createIdCard = (label, parmsName) => createField({
  label: label, parmsName: parmsName, controlType: 'idCard'
})

/**
 * 手机号输入框
 *
 * @param label
 * @param parmsName
 * @returns {any}
 */
const createPhone = (label, parmsName) => createField({
  label: label, parmsName: parmsName, controlType: 'telphone'
})
/**
 * 单选下拉框
 *
 * @param label
 * @param parmsName
 * @param dataName
 * @param isMultiSelect
 * @returns {any}
 */
const createSelect = (label, parmsName, dataName, isMultiSelect = false) => createField({
  label: label, parmsName: parmsName, controlType: 'select', dataName: dataName, multiple: isMultiSelect
})
/**
 * 单日期选择框
 *
 * @param label
 * @param parmsName
 * @returns {any}
 */
const createDate = (label, parmsName) => createField({
  label: label,
  parmsName: parmsName,
  controlType: 'datePicker',
  format: 'yyyyMMdd',
  type: 'date',
  valueFormat: 'yyyyMMdd'
})
/**
 * 时间选择框
 * @param label
 * @param parmsName
 * @returns {any}
 */
const createTime = (label, parmsName) => createField({
  label: label,
  parmsName: parmsName,
  controlType: 'timeSelect'
})
/**
 * 数字输入框
 *
 * @param label
 * @param parmsName
 * @param min
 * @param max
 * @returns {any}
 */
const createNumber = (label, parmsName, min, max) => createField({
  label: label, parmsName: parmsName, max: max, type: 'number'
})
/**
 * 日期范围选择框
 *
 * @param label
 * @param parmsName
 * @returns {any}
 */
const createDateRange = (label, parmsName) => createField({
  controlType: 'datePicker',
  parmsName: parmsName,
  label: label,
  type: 'daterange',
  format: 'yyyyMMdd',
  rangeSeparator: '至',
  startPlaceholder: '开始日期',
  endPlaceholder: '结束日期'
})
/**
 * 文本域输入框
 *
 * @param label
 * @param parmsName
 * @param maxlength
 * @returns {any}
 */
const createText = (label, parmsName, maxlength = 225) => createField({
  label: label, parmsName: parmsName, maxlength: maxlength, type: 'textarea'
})
/**
 * 文件上传
 * @param label
 * @param parmsName
 * @param callBack
 * @returns {any}
 */
const createFileUpload = (label, parmsName, callBack = (data) => {
}) => createField({
  label: label, parmsName: parmsName, controlType: 'uploadFile', onSuccess: callBack
})
/**
 * 树形输入
 * @param label
 * @param parmsName
 * @returns {any}
 */
const createTree = (label, parmsName) => createField({
  controlType: 'treeInput',
  parmsName: parmsName,
  dataName: 'inputTreeData',
  valueName: 'value',
  labelName: 'text',
  title: label,
  props: {
    children: 'children',
    label: 'text'
  }
})
/**
 * 单选组件
 * @param label
 * @param parmsName
 * @param radioItems
 * @returns {any}
 */
const createRadio = (label, parmsName, radioItems = [{ label: '加载中...', Itemname: '加载中...' }]) => createField({
  label: label, parmsName: parmsName, controlType: 'radio', radioItems: radioItems
})

/**
 *
 * 声明表单字段开始
 *
 */
export const formItems = {
  DISABLE: 'DISABLE', REQUIRE: 'REQUIRE', MODI: 'MODI', ADD: 'ADD', COPY: 'COPY', DETAIL: 'DETAIL', UPDATE: 'update',
  PUBLIC: 'public', FUND: 'fund', SYSTEM: 'system', PROD: 'prod', FEE: 'fee', VAL: 'val', ORG: 'org', FILE: 'file',
  DATA:'data',
  portName: createInput('投组名称', 'port_name'),
  portCode2: createInput('投组代码', 'port_code'),
  isNode: createSelect('节点/组合', 'is_node', 'is_node'),
  acctMod: createSelect('核算方式', 'acct_mod', 't8_busi_account_type'),
  prodSeriesCode: createInput('产品系列代码', 'prod_series_code'),
  prodSeriesName: createInput('产品系列名称', 'prod_series_name'),
  t8ProdSeriesId: createSelect('产品系列', 't8_prod_series_id', ''),
  trusteeId: createSelect('托管行', 'trustee_id'),
  prodDocTemplates: createSelect('产品文档', 'prod_doc_templates'),
  issuCcy: createSelect('募集币种', 'issu_ccy', 't8_currtype'),
  investCuy: createSelect('投资币种', 'invest_cuy', 't8_currtype'),
  riskLev: createSelect('产品风险等级', 'risk_lev', 't8_prod_risk_level'),
  baseDays: createSelect('计息基数', 'basedays', 't8_intr_base'),
  sharebonusType: createSelect('分红方式', 'sharebonus_type', 'def_div_method', true),
  yieldBandingDesc: createText('收益率分档情况说明', 'yield_banding_desc'),
  isStructProd: createSelect('是否为结构化(分级)产品', 'is_structprod', 't8_1yes0no'),
  levelType: createSelect('层级类别', 'level_type', 't8_level_type'),
  minSubsP: createMoney('认购起点金额(元/个人)', 'min_subs_p'),
  stepSubsP: createMoney('认购递增金额(元/个人)', 'step_subs_p'),
  maxBuyP: createMoney('累计购买金额上限(元/个人)', 'max_buy_p'),
  minSubsM: createMoney('认购起点金额(元/机构)', 'min_subs_m'),
  stepSubsM: createMoney('认购递增金额(元/机构)', 'step_subs_m'),
  maxSubsM: createMoney('认购最高金额(元/机构)', 'max_subs_m'),
  maxSubsP: createMoney('认购最高金额(元/个人)', 'max_subs_p'),
  maxBuyM: createMoney('累计购买金额上限(元/机构)', 'max_buy_m'),
  minPchsP: createMoney('申购起点金额(元/个人)', 'min_pchs_p'),
  stepPchsP: createMoney('申购递增金额(元/个人)', 'step_pchs_p'),
  maxPchsP: createMoney('申购最高金额(元/个人)', 'max_pchs_p'),
  minHoldP: createNumber('最低持有份额(份/个人)', 'min_hold_p'),
  minRedeemP: createNumber('单笔赎回最低份额(份/个人)', 'min_redeem_p'),
  minPchsM: createMoney('申购起点金额(元/机构)', 'min_pchs_m'),
  stepPchsM: createMoney('申购递增金额(元/机构)', 'step_pchs_m'),
  maxPchsM: createMoney('申购最高金额(元/机构)', 'max_pchs_m'),
  minHoldM: createNumber('最低持有份额(份/机构)', 'min_hold_m'),
  minRedeemM: createNumber('单笔赎回最低份额(份/机构)', 'min_redeem_m'),
  authorName: createSelect('产品审批人', 'author_name'),
  authorIdentif: createIdCard('审批人证件号码', 'author_identif'),
  designName: createSelect('产品设计人', 'design_name'),
  designIdentif: createIdCard('设计人证件号码', 'design_identif'),
  manageName: createSelect('投资经理', 'manage_name'),
  manageIdentif: createIdCard('投资经理证件号码', 'manage_identif'),
  salemanName: createSelect('产品联络人', 'saleman_name'),
  salemanPhoneno: createInput('产品联络人座机', 'saleman_phoneno'),
  salemanTelNo: createInput('产品联络人手机号', 'saleman_telno'),
  salemanEmail: createInput('产品联络人邮箱', 'saleman_email'),
  salePlace: createSelect('资金投向地', 'sale_place', 't8_zhz_sale_place'),
  salePlaceName: createSelect('产品投组国家或地区', 'sale_place_name', 't8_sale_place_name', true),
  manageMode: createSelect('产品管理模式', 'manage_mode', 't8_zhz_manage_mode'),
  adminName: createInput('实际管理人名称', 'admin_name', 255),
  assetMaping: createSelect('产品资产配置方式', 'asset_maping', 't8_zhz_asset_maping'),
  pricingType: createSelect('产品定价方式', 'pricing_type', 't8_zhz_pricing_type'),
  structProdSubject: createSelect('结构性产品挂钩标的', 'structprod_subject', 't8_structprod_subject'),
  cooperationMode: createSelect('合作模式', 'cooperation_mode', 't8_zhz_cooperation_mode'),
  cooperationOrgName: createInput('合作机构名称', 'cooperation_org_name'),
  returnCost: createSelect('投资本金到账日', 'return_cost', 't8_zhz_return_cost'),
  returnIncome: createSelect('投资收益到账日', 'return_income', 't8_zhz_return_cost'),
  prodCreditFlag: createSelect('产品增信标识', 'prod_credit_flag', 't8_zhz_is_not2'),
  prodCreditOrg: createSelect('产品增信机构', 'prod_credit_org', 't8_zhz_credit_org'),
  prodCreditMod: createSelect('产品增信形式', 'prod_credit_mod', 't8_zhz_up_credit'),
  prodBrand: createInput('产品品牌', 'prod_brand', 20),
  returnCcy: createSelect('兑付本金币种', 'return_ccy', 't8_currtype'),
  incomeCcy: createSelect('兑付收益币种', 'income_ccy', 't8_currtype'),
  prodPrecent: createText('投资资产种类及比例', 'prod_precent', 126),
  trusteeCode: createInput('境内托管机构代码', 'trustee_code', 32),
  trusteeName1: createInput('境内托管机构名称', 'trustee_name1', 128),
  operMod: createSelect('管理方式', 'oper_mod', 't8_reserve6'),
  collMod: createSelect('募集方式', 'coll_mod', 't8_reserve4'),
  busiMod: createSelect('业务模式', 'busi_mod', 't8_reserve4'),
  safeRate: createSelect('收益保证标志', 'safe_rate', 't8_1yes0no'),
  safeCapit: createSelect('本金保障标志', 'safe_capit', 't8_1yes0no'),
  termFlag: createSelect('可提前终止标志', 'term_flag', 't8_1yes0no'),
  redeemFlag: createSelect('可赎回权标志', 'redeem_flag', 't8_1yes0no'),
  trusteeCountryName: createInput('境外托管机构国别', 'trust_country_name', 128),
  oversTrusteeName: createInput('境外托管机构名称', 'overs_trustee_name', 128),
  prodSeriesNameRule: createSelect('命名规则', 'prod_name_rule', 't8_prod_series_name'),
  pmodName: createInput('模板名称', 'pmod_name'),
  prodMod: createSelect('产品模式', 'prod_mod'),
  custName: createInput('姓名', 'cust_name'),
  custType: createSelect('业务类型', 'cust_type'),
  prodName: createInput('产品代码/名称', 'prod_name'),
  irTagName: createInput('指标名称', 'ir_tag_name'),
  irTagLevel: createInput('级别', 'ir_tag_level'),
  portCode: createInput('产品组合', 'port_code'),
  dateStart: createDateRange('成立日区间', 'date_start'),
  dateEnd: createDateRange('到期日区间', 'date_end'),
  runStat: createSelect('产品状态', 'run_stat', 't8_prod_state'),
  investObject: createSelect('投资者类型', 'invest_object', 't8_sale_oside'),
  incomeType: createSelect('产品收益类型', 'income_type', 't8_income_attr'),
  feeAdtype: createSelect('费用分类', 'fee_adtype', 't8_fee_adtype'),
  note: createText('描述', 'note'),
  lossAccountCode: createInput('科目代码(损益类)', 'loss_account_code', null, '损益类6开头'),
  lossAccountName: createInput('科目名称(损益类)', 'loss_account_name'),
  debtAccountCode: createInput('科目代码(负债类)', 'debt_account_code', null, '负债类2开头'),
  debtAccountName: createInput('科目名称(负债类)', 'debt_account_name'),
  feeName: createInput('费用名称', 'fee_name'),
  state: createSelect('是否启用', 'state', '1yes0no'),
  feeSetName: createInput('费用方案名称', 'fset_name'),
  settleDate: createDate('查询日', 'settle_date'),
  userName: createInput('用户名', 'username'),
  portName3: formFuncs.createCheckBox('投组名称', 'name'),
  line: createField({ controlType: 'line' }),
  loginName: createInput('用户登录名', 'loginname'),
  planCode: createInput('方案代码', 'plan_code', 20),
  planName: createInput('方案名称', 'plan_name'),
  investFeeType: formFuncs.createCheckBox('费用类型', 'invest_fee_type'),
  billingNumber: createSelect('计费基数', 'billing_number', 't8_billing_number'),
  collectFeeCycle: createSelect('费用支付频率', 'collect_fee_cycle', 't8_pay_fee'),
  feeModel: createSelect('收费模式', 'fee_model', 't8_invest_fee_model'),
  ratesValue: createNumber('费率值(%)', 'rates_value', 0, 200),
  feeBase: createSelect('计费基础', 'fee_base', 't8_intr_base'),
  costValueDown: createMoney('最低费用(元)', 'cost_value_down'),
  costValueUp: createMoney('最高费用(元)', 'cost_value_up'),
  nextFeeWorkDay: createSelect('非工作日顺延', 'nextfeeworkday', 't8_next_workday'),
  firstDate: createDate('首次付费日', 'firstdate'),
  prodCode: createInput('产品代码', 'prod_code'),
  incomeRate: createNumber('收益率(%)', 'income_rate', 0, 100),
  payRate: createNumber('费率(%)', 'pay_rate', 0, 100),
  payInterestFreq: createSelect('付息频率', 'payinterest_freq', 't8_pay_newfreq'),
  payFeeFreq: createSelect('付费频率', 'payfee_freq', 't8_pay_newfreq'),
  startInterestDate: createDate('起息日', 'startinterest_date'),
  endInterestDate: createDate('到期日', 'endinterest_date'),
  t8SysPortfolId: createSelect('产品组合', 't8_sys_portfol_id'),
  raiseMoney: createMoney('募集金额(元)', 'raise_money'),
  settleDate1: createDate('交易日期', 'settle_date'),
  prodBalance: createMoney('产品余额(元)', 'prodbalance'),
  busDirection: createSelect('交易方向', 'busdirection'),
  isAssdept: createSelect('资产/负债', 'isassdept'),
  ftoolCode: createInput('资产代码', 'ftool_code'),
  ftoolName: createInput('资产名称', 'ftool_name'),
  busiPrincipal: createMoney('交易本金(持仓)', 'busiprincipal'),
  matureGrossAmount: createMoney('交易金额(元)', 'maturegrossamount'),
  idType: createSelect('证件类型', 'id_type', 't8_agent_id_type'),
  idCode: createIdCard('证件号码', 'id_code'),
  mobile: createPhone('手机号', 'mobile'),
  homeTel: createInput('座机', 'home_tel'),
  email: createInput('邮箱', 'email', 90),
  address: createInput('地址', 'address', 123),
  sex: createSelect('性别', 'sex', 'sex'),
  institution: createSelect('所属总行或分行', 'institution', 't8_subordinate_institutions'),
  area: createSelect('所属区域', 'area', 't8_sales_area'),
  company: createInput('具体单位名称', 'company', 127),
  department: createInput('所属部门', 'department', 90),
  position: createInput('职位', 'position', 127),
  education: createSelect('学历', 'education', 't8_education'),
  degree: createSelect('学位', 'degree', 't8_degree'),
  firstWorkTime: createDate('首次参加工作时间', 'first_work_time'),
  firstAmsTime: createDate('首次从事理财业务时间', 'first_ams_time'),
  professionalTitles: createSelect('专业技术职称', 'professional_titles', 't8_professional_titles'),
  financialCertificate: createSelect('理财专业证书', 'financial_certificate', 't8_financial_certificate', true),
  financialCertificateCode: createInput('培训证书编号', 'financial_certificate_code'),
  award: createInput('所获奖励', 'award'),
  registerType: createSelect('登记业务分类', 'register_type', 't8_register_type', true),
  registerPerson: createSelect('登记人员类别', 'register_person', 't8_register_person', true),
  remark: createInput('备注', 'remark'),
  checkInon: createInput('产品中债登记编码', 'check_inon', 32),
  bonddealExcel: createFileUpload('中债登记编码导入', 'bonddeal_excel'),
  irTradeDate: createDate('生效日期', 'ir_tradedate'),
  irRate: createNumber('利率(%)', 'ir_rate'),
  irTagCode: createInput('指标编码', 'ir_tag_code'),
  pmodCode: createSelect('产品模板', 'pmod_code'),
  prodPlan: createSelect('发行计划', 'prod_plan'),
  isOnline: createSelect('是否线上产品', 'is_online'),
  isCycle: createSelect('是否为客户周期型', 'is_cycle'),
  isStructProdChange: createSelect('是否结构化(分级)产品', 'is_structprod_change'),
  isStructDeposit: createSelect('是否结构性存款', 'is_structdeposit'),
  fatherType: createSelect('父子型产品类别', 'father_type'),
  prodType: createSelect('产品类型', 'prod_type'),
  sourceValueBank: createSelect('银行间债券估值来源', 'source_value_bank'),
  sourceValueExchange: createSelect('交易所债券估值来源', 'source_value_exchange'),
  carryMod: createSelect('结转方式', 'carry_mod'),
  expeScaleW: createMoney('计划募集金额', 'expe_scale_w'),
  actualScaleW: createNumber('实际规模', 'actual_scale_w'),
  deprtForRisk: createInput('风险资产承担部门信息', 'deprt_for_risk'),
  minRate: createNumber('预计客户最低年收益率(%)中债', 'min_rate'),
  maxRate: createNumber('预计客户最高年收益率(%)(中债)', 'max_rate'),
  expeRate: createNumber('平均预计客户年收益率(%)(中债)', 'expe_rate'),
  minSize: createMoney('发行规模下限(万元)', 'min_size'),
  threshold1: createInput('偏离阈值一', 'threshold1'),
  threshold2: createInput('偏离阈值二', 'threshold2'),
  chargeType: createSelect('收费方式', 'charge_type'),
  payType: createSelect('扣费方式', 'pay_type'),
  bigRate: createNumber('巨额赎回比例(%)', 'big_rate'),
  isRensRate: createSelect('是否有认购费', 'is_rens_rate'),
  rensRate: createNumber('认购费率(%)', 'rens_rate'),
  isSubsRate: createSelect('是否有申购费', 'is_subs_rate'),
  subsRate: createNumber('申购费率', 'subs_rate'),
  isRedeemRate: createSelect('是否有赎回费', 'is_redeem_rate'),
  redeemRate: createNumber('赎回费率', 'redeem_rate'),
  superiorProdName: createInput('父产品名称', 'superior_prod_name'),
  trusteeMod: createSelect('托管模式', 'trustee_mod'),
  saleArea: createSelect('产品销售区域', 'sale_area', '', true),
  subsBDate: createDate('认购起始日期', 'subs_bdate'),
  subsBeginTime: createTime('认购起始时间', 'subs_begin_time'),
  subsEDate: createDate('认购结束日期', 'subs_edate'),
  subsEndTime: createTime('认购结束时间', 'subs_end_time'),
  establishDate: createDate('产品起始日期(中债)', 'establish_date'),
  startFeeDate: createDate('收益起始日期', 'start_fee_date'),
  openBeginDate: createDate('开放起始日期', 'open_begin_date'),
  openBeginTime: createTime('开放起始时间', 'open_begin_time'),
  openEndDate: createDate('开放结束日期', 'open_end_date'),
  openEndTime: createTime('开放结束时间', 'open_end_time'),
  endDate: createDate('产品终止日期(中债)', 'end_date'),
  prodDays: createNumber('产品天数', 'prod_days'),
  prodCycle: createSelect('产品期限(中债)', 'prod_cycle'),
  subsDate: createSelect('申购确认日N值', 'subs_date'),
  redeemDate: createSelect('赎回确认日N值', 'redeem_date'),
  rengeMode: createSelect('头尾算法', 'renge_mode'),
  orgNo: createTree('发行机构代码(中债)', 'orgno'),
  payDate: createDate('兑付日期', 'pay_date'),
  minAppendP: createMoney('认购追加起点(元/个人)', 'min_append_p'),
  minAppendM: createMoney('机构追加起点(元/机构)', 'min_append_m'),
  stepRedeemP: createMoney('单笔赎回递增份额(份/个人)', 'step_redeem_p'),
  stepRedeemM: createMoney('单笔赎回递增份额(份/机构)', 'step_redeem_m'),
  authorNo: createSelect('产品审批人', 'author_no'),
  designNo: createSelect('产品设计人', 'design_no'),
  manageNo: createSelect('投资经理', 'manage_no'),
  saleManNo: createSelect('产品联络人', 'saleman_no'),
  srvMode: createSelect('理财业务服务模式', 'srv_mode'),
  t8InvestPropType: createSelect('投资性质分类', 't8_invest_prop_type'),
  isExpeRate: createSelect('是否有预期收益率(中债)', 'is_expe_rate'),
  isBasisOfCount: createSelect('是否有收益率测算依据(中债)', 'is_basisofcount'),
  isPeerExc: createSelect('是否金融同业专属(中债)', 'is_peer_exc'),
  isMinHTime: createSelect('是否设置最短持有期限(中债)', 'is_min_htime'),
  minHTime: createInput('短持有期限(天)(中债)', 'min_htime'),
  isRansomMinHTime: createSelect('最短持有期后是否自由赎回(中债)', 'is_ransom_min_htime'),
  isCashManage: createSelect('是否现金管理类(中债)', 'is_cash_manage'),
  startRaise: createDate('募集起始日期(从)', 'start_raise'),
  endRaise: createDate('募集起始日期(到)', 'end_raise'),
  reportScale: createNumber('报备募集金额(中债)', 'report_scale'),
  prod_credit_flag: createSelect('产品增信标识', 'prod_credit_flag'),
  bankProdSid: createInput('行内标识码', 'bank_prodsid'),
  prodTimes: createNumber('产品期次', 'prod_times'),
  openMod: createSelect('开放模式', 'open_mod'),
  regularOpenCycle: createSelect('规律开放周期', 'regular_open_cycle'),
  othRegulOpenCyc: createInput('其他规律开放周期', 'oth_regul_open_cyc'),
  irrugularOpenDesc: createText('无规律开放说明', 'irregular_open_desc', 126),
  firstOpenDate: createDate('首次开放周期起始日', 'first_open_date'),
  isOpenInHoliday: createSelect('节假日是否开放', 'is_open_in_holiday'),
  openTimes: createNumber('平均开放次数(年化)', 'open_times'),
  openPeriodBusiness: createSelect('开放期业务', 'open_period_business'),
  openPeriBusiDesc: createText('开放期业务说明', 'open_peri_busi_desc'),
  bordTrustiCode: createInput('境内托管机构代码', 'bord_trusti_code'),
  bordTrustiName: createInput('境内托管机构名称', 'bord_trusti_name'),
  oversTrustiNation: createInput('境外托管机构国别', 'overs_trusti_nation'),
  oversTrustiName: createInput('境外托管机构名称', 'overs_trusti_name'),
  floatFee: createSelect('浮动费用', 'float_fee'),
  feeStartDate: createDate('开始日期', 'fee_start_date'),
  feeEndDate: createDate('结束日期', 'fee_end_date'),
  t8FeePlanIds: createSelect('费用方案', 't8_fee_plan_ids'),
  openRule: createSelect('开放规则', 'open_rule'),
  openFreq: createSelect('开放频率', 'open_freq'),
  openDays: createNumber('间隔天数', 'opendays'),
  startOpenDay: createDate('开放起始日期', 'start_openday'),
  firstOpenDay: createDate('首次开放日', 'first_open_day'),
  endOpenDay: createDate('开放结束日期', 'end_openday'),
  openNextDay: createSelect('非工作日顺延', 'open_next_day'),
  customOpenDay: createText('自定义开放日', 'customopenday'),
  perfermenceAlgorithm: createSelect('业绩报酬算法', 'perfermence_algorithm'),
  perfermenceType: createSelect('业绩基准利率类型', 'perfermence_type'),
  t8ProdNormrateTagId: createInput('市场利率指标', 't8_prod_normrate_tag_id'),
  newPerfermenceData: createInput('查看最新利率', 'new_perfermence_data'),
  perfermenceSetRadio: createRadio('业绩报酬计提设置', 't8_perfermence_set'),
  perfermenceSet: createInput('业绩报酬计提设置数值', 'perfermence_set'),
  bpStart1: createNumber('利差(%)', 'bp_start_1'),
  bpEnd1: createNumber('利差(%)', 'bp_end_1'),
  bpStart2: createNumber('利差区间(%)', 'bp_start_2'),
  bpEnd2: createNumber('利差区间(%)', 'bp_end_2'),
  bpStart3: createNumber('基准利率(%)', 'bp_start_3'),
  bpEnd3: createNumber('基准利率(%)', 'bp_end_3'),
  bpStart4: createNumber('基准利率区间(%)', 'bp_start_4'),
  bpEnd4: createNumber('基准利率区间(%)', 'bp_end_4'),
  planRate: createNumber('计提比例', 'plan_rate'),
  callbackType: createSelect('回拨类型', 'callback_type'),
  firstCallbackType: createSelect('优先回拨费用类型', 'first_callback_type'),
  callbackExcessRemunera: createNumber('超额业绩报酬-回拨比例(%)', 'callback_excess_remunera'),
  callbackManagement: createNumber('固定管理费-回拨比例(%)', 'callback_management'),
  appFreq: createSelect('估值频率', 'app_freq'),
  startAppDay: createDate('估值起始日期', 'start_appday'),
  firstAppDay: createDate('首次估值日', 'first_app_day'),
  endAppDay: createDate('估值结束日期', 'end_appday'),
  nextAppDay: createDate('非工作日顺延', 'next_app_day'),
  customAppDay: createText('自定义估值日', 'customappday'),
  publishFreq: createSelect('披露频率', 'publish_freq'),
  firstPublishDay: createDate('首次披露日', 'first_publish_day'),
  endPublishDay: createDate('披露结束日期', 'end_publish_day'),
  publishNextDay: createSelect('非工作日顺延', 'publish_next_day'),
  peopleBankSubmitCode: createInput('人行报送产品代码', 'peoplebank_submitcode'),
  prodCal: createInput('产品期限', 'prod_cal'),
  actualScale: createNumber('实际规模(万元)', 'actual_scale'),
  inputUser: createInput('录入柜员', 'inputuser'),
  orgName: createInput('独立核算对象', 'org_name'),
  orgname: createInput('所属机构名', 'orgname'),
  prodPeriods: createInput('产品期数', 'prod_periods'),
  prodNameRule: createInput('命名规则', 'prod_name_rule'),

  formSize: 'small',
  clearable: true,
  buttonSize: 'normal'
}

